import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
//导入路由
import router from "./router/router";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import ElementPlus from 'element-plus'
// @ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const app = createApp(App);
//从 @element-plus/icons-vue 中导入所有图标并进行全局注册。
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
//本地化ElementPlus
app.use(ElementPlus, {
  locale: zhCn,
})
//将路由挂载到实例
app.use(router).mount("#app");
